<template>
	<z-paging ref="paging" v-model="lists" @query="getapp">
		<template>
			<view class=" d-back ">
				<!-- <image :src="picture" style="width:480rpx; height:134rpx;margin-left: 100rpx;margin-top: 100rpx;">
				</image> -->
				<!-- <view style="padding-top: 100rpx;">
					<view style="font-size: 110rpx;text-align: center;color: #fff;">
						您 身 边 的 体 育 场 馆 信 息 化 提 供 商
					</view>
					<view style="font-size: 70rpx;text-align: center;color: #fff;margin-top: 10px;">
						The Information Provider Of Sports Venues Around You
					</view>
				</view> -->
				<view class=""
					style="display: flex; justify-content: center;justify-content: space-between; ">
					<view class="">
						<!-- uni-app 示例 -->
						<video id="myVideo" src="../../static/tianyue_zizhuji_video_01.mp4" object-fit="fill"
							style="width: 100vw; height: 75vh;" autoplay loop playsinline
							:show-fullscreen-btn="false" :show-play-btn="false" :controls="false" @ended="videoEnded"
							@error="videoError"></video>
					</view>
					<!-- <view class="">
						<video id="myVideo" src="../../static/tianyue_zizhuji_video_02.mp4"
							style="width: 48vw; height: 30vh;" autoplay muted loop playsinline
							:show-fullscreen-btn="false" :show-play-btn="false" :controls="false"></video>
					</view> -->
				</view>
				<view style="display: flex; align-items: flex-end; justify-content: center;">
					<view class="" style="position: relative;" @click="onTickets">
						<u-image src="../../static/23.png" width="618rpx" height="870rpx"></u-image>
						<!-- <image style="width:940rpx;height: 1462rpx;position: absolute;z-index: 98;top: 0;left: 0;" src="../../static/345345345.png" mode=""></image> -->
					</view>
					<!-- @click="chaxun" -->
					<!-- <view class=""  style="position: relative;" @click="dayin">
						<u-image src="../../static/chuzhika.png" width="940rpx" height="1462rpx"></u-image>
					</view> -->
				</view>
			</view>
		</template>
	</z-paging>
</template>

<script>
	// import {
	// 	card,
	// 	ticket
	// } from '@/common/api';
	// import jpKeyboard from '@/components/jp-keyboard/jp-keyboard.vue';
	// import keyboard from '@/components/dt-keyboard/dt-keyboard.vue';
	export default {
		// components: {
		// 	keyboard
		// },
		data() {
			return {
				lists: [],
				picture: '../../static/20.png',
				picture1: '../../static/21.png',
				picture2: '../../static/22.png',
				picture3: '../../static/23.png',
				value: '',
				show: false,
				failIf: false,
				showIf: true
			};
		},
		onLoad(e) {},
		onReady() {
			this.initVideo();
		},

		onShow() {
			// 页面每次显示时都尝试播放视频
			this.playVideo();
		},

		methods: {
			initVideo() {
				// 初始化视频
				this.$nextTick(() => {
					this.playVideo();
				});
			},
			playVideo() {
				// 播放视频
				const videoContext = uni.createVideoContext('myVideo', this);
				videoContext.play();
			},

			videoEnded() {
				// 视频结束时重新播放
				this.playVideo();
			},

			videoError(e) {
				console.error('视频错误:', e);
				// 错误处理
				const videoContext = uni.createVideoContext('myVideo', this);
				videoContext.seek(0);
				videoContext.play();
			},
			chaxun() {
				uni.navigateTo({
					url: '/pages/login/login'
				})
			},
			dayin() {
				uni.navigateTo({
					// url:'/pages/dayin/dayin'
					url: '/pages/buyingTickets/buying_Tickets'
				})
			},
			onTickets() {
				uni.navigateTo({
					url: '/pages/buyingTickets/buyingTickets'
				})
			},
			getPassword(e) {
				this.value = e
				// if(e!='123456'){
				//     this.failIf = true
				//     this.$refs.keyboard.clear()
				//     setTimeout(()=>this.failIf = false,600)
				// }else{console.log('密码正确')}
			},
			change(e) {
				console.log('change', e);
			},
			async getapp(page, limit) {
				// try {
				// 	let result = this.current === 0 ? await ticket({
				// 		page,
				// 		limit
				// 	}) : await card({
				// 		page,
				// 		limit
				// 	});
				// 	this.$refs.paging.complete(result.data);
				// } catch (e) {
				// 	this.$refs.paging.complete(false);
				// }
			},
		}
	};
</script>

<style lang="scss" scoped>
	.d-back {
		height: 100%;
		height: 100vh;
		// background: rgb(47, 127, 255);
		// background-image: url('../../static/19.png');
		background-size: cover;
		background-repeat: no-repeat;
	}

	.d-tag {
		background: #f3f3f3;
		border-radius: 4rpx;
		height: 36rpx;
		font-size: 24rpx;
		font-weight: 500;
		color: #333333;
		padding: 0 18rpx;
	}

	.d-be {
		color: #bebebe;
	}

	.d-red {
		color: #ffffff;
		margin-top: 10rpx !important;
	}

	.d-white {
		color: #ffffff;
		margin-top: 10rpx !important;
	}

	.d-xuxian {
		width: 100%;
		height: 1rpx;
		border-bottom: 1px dashed white;
		margin-top: 10rpx;
	}

	.d-bold {
		font-weight: bold;

	}
</style>